package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CelebrityMapper;
import com.ruoyi.system.domain.Celebrity;
import com.ruoyi.system.service.ICelebrityService;
import com.ruoyi.common.core.text.Convert;

/**
 * 参与人员Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-18
 */
@Service
public class CelebrityServiceImpl implements ICelebrityService 
{
    @Autowired
    private CelebrityMapper celebrityMapper;

    /**
     * 查询参与人员
     * 
     * @param celebrityId 参与人员主键
     * @return 参与人员
     */
    @Override
    public Celebrity selectCelebrityByCelebrityId(Long celebrityId)
    {
        return celebrityMapper.selectCelebrityByCelebrityId(celebrityId);
    }

    /**
     * 查询参与人员列表
     * 
     * @param celebrity 参与人员
     * @return 参与人员
     */
    @Override
    public List<Celebrity> selectCelebrityList(Celebrity celebrity)
    {
        return celebrityMapper.selectCelebrityList(celebrity);
    }

    /**
     * 新增参与人员
     * 
     * @param celebrity 参与人员
     * @return 结果
     */
    @Override
    public int insertCelebrity(Celebrity celebrity)
    {
        return celebrityMapper.insertCelebrity(celebrity);
    }

    /**
     * 修改参与人员
     * 
     * @param celebrity 参与人员
     * @return 结果
     */
    @Override
    public int updateCelebrity(Celebrity celebrity)
    {
        return celebrityMapper.updateCelebrity(celebrity);
    }

    /**
     * 批量删除参与人员
     * 
     * @param celebrityIds 需要删除的参与人员主键
     * @return 结果
     */
    @Override
    public int deleteCelebrityByCelebrityIds(String celebrityIds)
    {
        return celebrityMapper.deleteCelebrityByCelebrityIds(Convert.toStrArray(celebrityIds));
    }

    /**
     * 删除参与人员信息
     * 
     * @param celebrityId 参与人员主键
     * @return 结果
     */
    @Override
    public int deleteCelebrityByCelebrityId(Long celebrityId)
    {
        return celebrityMapper.deleteCelebrityByCelebrityId(celebrityId);
    }
}
